import React from 'react';
import FullCalendar from '@fullcalendar/react';

import listPlugin from '@fullcalendar/list';

import zhcnLocale from '@fullcalendar/core/locales/zh-cn';

const calendarListRef = React.createRef();

export default ({ options, events }) => (
  <FullCalendar
    plugins={[listPlugin]}
    locale={zhcnLocale}
    ref={calendarListRef}
    events={events}
    {...options}
  />
);
